package com.wyg.blog.controller.view_blog;

import com.wyg.blog.service.user.FriendSiteService;
import com.wyg.blog.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: WYG
 * @time: 2021/1/31 9:21
 */
@RestController
@RequestMapping("/api/view/site")
public class ViewSiteController {

    @Autowired
    FriendSiteService friendSiteService;

    @GetMapping("/getAllSite")
    @CrossOrigin
    public JsonResult<List<Map<String, String>>> getAllSite() {
        List<Map<String, String>> siteInfo = friendSiteService.selectSiteInfo();
        return new JsonResult<>(siteInfo, "200", "获取友链信息成功!");
    }
}
